Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python CPU test - basic scenario #4

Merged
merged 3 commits into from
Aug 4, 2023
Merged

Python CPU test - basic scenario #4

merged 3 commits into from
Aug 4, 2023

Conversation

r1viollet
Copy link
Collaborator

@r1viollet r1viollet commented Aug 1, 2023

Description

When moving to the docker implementation of tests, we removed the python test.
This adds it back in.

Naming adjustment: ensure we explicitly have the unit in the EXECUTION_TIME_SEC variable.

scenarios/python_cpu/Dockerfile Show resolved Hide resolved
scenarios/python_cpu/expected_profile.json Show resolved Hide resolved
scenarios/python_cpu/expected_profile.json Show resolved Hide resolved
scenarios/python_cpu/main.py Outdated Show resolved Hide resolved
while time() < end:
a()
b()
print(x)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is needed to avoid the compiler optimizing away the writes to x?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, locals would be optimized without a usage in more recent python versions.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add a comment explaining this.

Copy link

@danielsn danielsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its nice to have a test for this. I had a minor ⛏️ about commenting the need for the print(x) but otherwise LGTM.

@r1viollet r1viollet merged commit 85c6537 into main Aug 4, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants